package PropsObject;

import com.sxt.*;
import java.awt.*;
import java.util.Random;

abstract public class PropsObject extends GameObject {
    public static int PROPS_WIDTH = 60; //道具的宽度
    public static int PROPS_HEIGHT = 95; //道具的高度
    //道具存在时长
    int existTime = 1000;
    //道具效果延续时长
    public static int PropsLast=500;
    //随机速度
    Random random ;
    //图片路径
    String imagePath;
    //道具y速度
    int speedX;
    public PropsObject() {
        super();
    }

    public PropsObject(String image, GameWin frame) {
        super(image, frame);
    }

    public PropsObject(String image, int x, int y, int speedY, GameWin frame) {
        super(image, x, y, speedY, frame);
        random = new Random();
        random.setSeed(System.currentTimeMillis());
        imagePath = image;
        this.speedX=speedY;
    }

    public PropsObject(String image, int x, int y, int width, int height, int speedY, GameWin frame) {
        super(image, x, y, width, height, speedY, frame);
    }

    @Override
    abstract public void paintSelf(Graphics s);

    @Override
    abstract public Rectangle getRec();

    @Override
    abstract public void DeBug();
}
